﻿Imports cerveza

Public Class ReservaForm
    Private Sub btnBuscar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBuscar.Click
        Dim criterio As Integer = Me.txtBuscar.Text
        'MsgBox(criterio)

        Dim negocio As New ReservaNegocio
        Dim categorias As Collection = negocio.buscarPorID(criterio)
        Me.dgvCategorias.DataSource = categorias
        Me.dgvCategorias.EditMode = False
        MsgBox(categorias.Count)

        Me.dgvCategorias.Columns(0).HeaderText = "id_reserva"
        Me.dgvCategorias.Columns(1).HeaderText = "id_usuario"
        Me.dgvCategorias.Columns(2).HeaderText = "fecha_reserva"
        Me.dgvCategorias.Columns(3).HeaderText = "pago"
        Me.dgvCategorias.Columns(4).HeaderText = "total"

    End Sub
    Private Sub ReservaForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        With Me.dgvCategorias.ColumnHeadersDefaultCellStyle
            .BackColor = Color.Red
            .ForeColor = Color.White
        End With


    End Sub

End Class